<?php include PATH_TPL."/admin/tpl.header.phtml"?>
<script type="text/javascript">
</script>
<div class="main-container inner">
    <div class="main-content">
        <div class="container-fluid">
            <div class="row bt">
                <div class="col-lg-12 bg">
                    <ol class="breadcrumb">
                        <li class="active">
<?//count($tCourse)+count($tLive)?>
                        <i class="fa  fa-fw fa-reorder"></i>老人管理
                        </li>
                    </ol>
                </div>
            </div>
            <div class="row">
                <span class="text-center"><h4>老人信息详细</h4></span>
                <div class="">
                    <span style="margin-left:30px;">个人信息</span>
                    <div class="btn-group" style="margin-left:920px;">
                        <button type="button" id="save" class="btn btn-blue" style="height:30px;text-align:top;border-radius:10%;"><span style="position:relative;bottom:2px;" class="text">保存</span></button>
                        <a href="/admin_senior/" class="btn btn-blue" style="height:30px;text-align:top;margin-left:8px;border-radius:10%;"><span style="position:relative;bottom:2px;" class="text">取消</span></a>
                    </div>
                    <div class="table-group" style="margin-left:100px;margin-top:10px;">
                        <form method="post">
                        <table border="1" style="min-width:600px;font-size:15px;font-family:'宋体';text-align:center;background-color:#F7F7F7;">
                            <tr>
                                <td rowspan="3"></td>
                                <td>姓名</td> 
                                <td>性别</td> 
                                <td>年龄</td> 
                                <td>民族</td> 
                                <td>宗教</td> 
                                <td>户口所在地</td> 
                                <td>身份证号</td> 
                                <td style="width:10px;">出生年月</td> 
                                <td style="text-align:left;width:10px;">婚姻情况</td> 
                            </tr> 
                            <tr>
                                <td><input type="text" value="" name="senior_name" style="width:70px;height:30px;"/></td>
                                <td>
                                    <select name="sex">
                                        <option value="1">男</option>
                                        <option value="2">女</option>
                                        <option value="0">未知</option>
                                    </select>
                                </td>
                                <td><input type="text" name="age" style="width:50px;"/></td>
                                <td>
                                    <select name="nation">
                                    <?foreach($tNIDatas as $tNIRow){?>
                                    <option value="<?=$tNIRow['num']?>"><?=$tNIRow['introduce']?></option>
                                    <?}?>
                                    </select>
                                </td>
                                <td>
                                    <select name="religion">
                                    <?foreach($tRIDatas as $tRIRow){?>
                                    <option value="<?=$tRIRow['num']?>"><?=$tRIRow['introduce']?></option>
                                    <?}?>
                                    </select>
                                </td>
                                <td><input type="text" name="permanent_residence" style="width:100px;"/></td>
                                <td><input type="text" name="critcode" style="width:100px;"/></td>
                                <td style="width:10px;"><input type="text" name="birth_date" style="width:80px;"/></td>
                                <td>
                                    <select name="married">
                                        <option>未婚</option>
                                    </select>
                                </td>
                            </tr> 
                            <tr>
                                <td>医保卡号</td>
                                <td>基础费用</td>
                                <td>收费折扣</td>
                                <td>支付方式</td>
                                <td>所在部门</td> 
                                <td>文化程度</td> 
                                <td>身体状况</td> 
                                <td style="width:10px;">医保状况</td> 
                            </tr> 
                            <tr>
                                <td><input type="file" style="width:150px;" name=""></td>
                                <td><input type="text" name="card_number" style="width:70px;height:30px;"/></td>
                                <td><input type="text" name="basic_fee" style="width:70px;height:30px;"/></td>
                                <td>
                                    <select name="charge_discount">
                                        <option>98</option>
                                    </select>
                                </td>
                                <td>
                                    <select name="payment">
                                        <option>周付</option>
                                    </select>
                                </td>
                                <td>
                                    <select name="department">
                                    <?foreach($tDIDatas as $tDIRow){?>
                                    <option value="<?=$tDIRow['num']?>"><?=$tDIRow['introduce']?></option>
                                    <?}?>
                                    </select>
                                </td>
                                <td>
                                    <select name="education_levels">
                                    <?foreach($tEIDatas as $tEIRow){?>
                                    <option value="<?=$tEIRow['num']?>"><?=$tEIRow['introduce']?></option>
                                    <?}?>
                                    </select>
                                </td>
                                <td>
                                    <select name="body_status">
                                    <?foreach($tBIDatas as $tBIRow){?>
                                    <option value="<?=$tBIRow['num']?>"><?=$tBIRow['introduce']?></option>
                                    <?}?>
                                    </select>
                                </td>
                                <td style="width:10px;">
                                    <select name="medical_status">
                                        <option>有</option>
                                        <option>无</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>入住前住址</td>
                                <td colspan="4" style="text-align:left;"><input type="text" name="old_address" style="width:300px;height:30px;margin-left:20px;"/></td>
                                <td>原工作单位</td>
                                <td colspan="3" style="text-align:left;width:230px;"><input type="text" name="old_company" style="width:260px;height:30px;margin-left:20px;"/></td>
                            </tr>
                            <tr>
                                <td>脾气/爱好</td>
                                <td colspan="4" style="text-align:left;"><input type="text" name="temper_hobby" style="width:300px;height:30px;margin-left:20px;"/></td>
                                <td>病史/过敏</td>
                                <td colspan="4" style="text-align:left;width:230px;"><input type="text" name="allergies" style="width:260px;height:30px;margin-left:20px;"/></td>
                            </tr> 
                            <tr>
                                <td colspan="14" border="0" style="background-color:#ffffff">&nbsp;</td>
                            </tr>
                            <tr>
                                <td rowspan="2">委托人</td>
                                <td style="height:40px;width:20px;">姓名</td>
                                <td style="width:100px;text-align:left;"><input name="wt_name" style="width:100px;" type="text" name="" /></td>
                                <td style="height:40px;width:20px;">关系</td>
                                <td style="width:100px;text-align:left;"><input name="wt_relation"style="width:100px;" type="text" name="" /></td>
                                <td>联系电话</td>
                                <td colspan="4" style="width:200px;text-align:left;"><input name="wt_phone" style="width:300px;" type="text" name="" /></td>
                            </tr>
                            <tr>
                                <td style="height:40px;width:20px;">住址</td>
                                <td colspan="3" style="text-align:left;"><input type="text" name="wt_address" style="width:250px;"></td>
                                <td>证件号码</td>
                                <td colspan="4" style="width:200px;text-align:left;"><input name="wt_critcode" style="width:300px;" type="text" name="" /></td>
                            </tr>
                            <tr>
                                <td rowspan="3">习惯</td>    
                                <td>饮食</td>
                                <td style="text-align:left;" colspan="8">
                                    <textarea name="diet" style="width:660px;height:90px;margin-left:6px;"></textarea>
                                </td>    
                            </tr>
                            <tr>
                                <td>生活</td>
                                <td style="text-align:left;" colspan="8">
                                    <textarea name="left" style="width:660px;height:90px;margin-left:6px;"></textarea>
                                </td>    
                            </tr>
                            <tr>
                                <td>睡眠</td>
                                <td style="text-align:left;" colspan="8">
                                    <textarea name="sleep" style="width:660px;height:90px;margin-left:6px;"></textarea>
                                </td>    
                            </tr>
                            <tr>
                                <td rowspan="4">用药信息/医嘱</td>
                                <td rowspan="4">用药</td>
                                <td colspan="2">
                                    <select style="width:120px;">
                                        <option>111</option>
                                    </select>
                                </td>
                                <td colspan="2" rowspan="4">&nbsp;</td>
                                <td rowspan="4">医嘱</td>
                                <td colspan="3" rowspan="4">&nbsp;</td>
                            </tr>
                            <tr>
                                <td style="text-align:left;">药量：</td>
                                <td style="text-align:left;"><input type="text" name="" style="width:60px;"/></td>
                            </tr>
                            <tr>
                                <td colspan="2">时间：</td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <select style="width:120px;">
                                        <option>早上</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>自测身体检查</td>
                                <td style="text-align:left;" colspan="9">
                                    <textarea style="width:660px;height:90px;margin-left:45px;"></textarea>
                                </td>    
                            </tr>
                            <tr>
                                <td>出院诊断</td>
                                <td style="text-align:left;" colspan="9">
                                    <textarea style="width:660px;height:90px;margin-left:45px;"></textarea>
                                </td>    
                            </tr>
                            <tr>
                                <td colspan="14" border="0" style="background-color:#ffffff">
                                    <span>家属信息</span>
                                    <button type="button" id="addQinshu" class="btn btn-blue" style="margin-left:50px;" onclick="addJiashu();">添加</button>
                                </td>
                            </tr>
                            <tr class="qinshu">
                                <td>姓名</td>
                                <td>性别</td>
                                <td colspan="2">关系</td>
                                <td colspan="2">身份证号</td>
                                <td colspan="4">家庭住址</td>
                            </tr>
                            <tr>
                                <td colspan="14" border="0" style="background-color:#ffffff">
                                    <span>扫描件信息</span>
                                </td>
                            </tr>
                        </table> 
                        </form>
                    </div>  
                </div>
            </div>
        </div><!--container-fluid  -->
    </div><!--main-content  -->
</div><!--main-container  -->
<script>
$(function(){
//提交
    var options={
        beforeSubmit : showRequest,    // 提交前的回调函数
        success : showResponse,    // 提交后的回调函数
        dataType : "json",    // html（默认）、xml、script、json接受服务器端返回的类型
        timeout : 3000    // 限制请求的时间，当请求大于3秒后，跳出请求
    }
    function showRequest(formData, jqForm, options){
        return true;
    }
    function showResponse(responseText,statusText){
        cg_alert_add(responseText,'/admin_user','/admin_user/userinfo');
    }
    $('#search').click(function(){
        $('form').submit();
    });


});
function addJiashu(){
    $('.qinshu').after('<tr><td><input type="text" name="" style="width:100px;" /></td><td><select><option>男</option><option>女</option><option>未知</option></select></td><td colspan="2"><input type="text" name="" style="width:100px;" /></td><td colspan="2"><input type="text" name="" style="width:180px;" /></td><td colspan="4"><input type="text" name="" style="width:300px;" /></td></tr>');
}
$('#save').click(function(){
    var data = $('form').serialize();
    $.post('/admin_senior/add',data,function(obj){
        cg_alert_add(obj,'/admin_senior/','/admin_senior/add');
    });
});
</script>



<?php include PATH_TPL."/admin/tpl.footer.phtml"?>
